<?php
/**
 * Created by PhpStorm.
 * User: yucheng
 * Date: 2017/11/3
 * Time: 23:09
 */

//for ($k = 0; $k < 2; $k++) {//First loop
//    for ($j = 0; $j < 2; $j++) {//Second loop
//        for ($i = 0; $i < 4; $i++) {//Third loop
//            if ($i > 1)
//                continue 2;
//            echo "$i\n";
//        }
//    }
//}


for ($j = 0; $j < 3; $j++) {//Second loop
    for ($i = 0; $i < 4; $i++) {//Third loop
        if ($i > 1) {
            echo "in $i\n";
            continue 2;
        }
        echo "$i\n";
    }
}